home *** CD-ROM | disk | FTP | other *** search
- Path: news.mel.aone.net.au!usenet
- From: clyde@hitech.com.au (Clyde Smith-Stubbs)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Poor floating point code in BC++
- Date: Tue, 02 Jan 1996 04:48:12 GMT
- Organization: HI-TECH Software
- Message-ID: <30e8b8c4.1015833152@news.bne.aone.net.au>
- References: <4c9sja$gke$1@mhafc.production.compuserve.com>
- Reply-To: clyde@hitech.com.au
- NNTP-Posting-Host: skyhawk.hitech.com.au
- X-Newsreader: Forte Agent .99c/16.141
-
- On 2 Jan 1996 00:00:42 GMT, Dave Hand <70621.3624@CompuServe.COM>
- wrote:
-
- >would very much like to know if other compilers do a better job (or
- >set me straight as to why the above code makes sense).
-
- Hmm, this is what HI-TECH C generates (using in-line 8087 code):
-
- ;f.c: 8: n = (int)x;
- fld -8[bp], qword
- fistp -26[bp], word
- ;f.c: 9: z = x * y;
- fld -8[bp], qword
- fmul -16[bp], qword
- fstp -24[bp], qword
-
-
-
- Clyde Smith-Stubbs | HI-TECH Software, | Voice: +61 7 3300 5011
- clyde@hitech.com.au | P.O. Box 103, Alderley, | Fax: +61 7 3300 5246
- http://www.hitech.com.au | QLD, 4051, AUSTRALIA. | BBS: +61 7 3300 5235
- ----------------------------------------------------------------------------
- FREE! Download our shareware (FREE for noncommercial use) MS-DOS C Compiler!
- Point your Web browser at http://www.hitech.com.au/
-